<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="format-detection" content="telephone=no" />
<title>设置支付密码</title>
<link rel="stylesheet" type="text/css" href="${ctxStatic}/member/themes/fashion/css/user.css" />
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function() {
	$("#errorMessage").hide()
});


function checkForm(){
	
	
	 
	

	var password = $.trim($('#password').val());
	var psd = $.trim($('#psd').val());
	var path = /^\d{6}$/;
	
	
	
	
	
	
	
	
	
	
	
	
	
	if(password == null || password ==''){
		$("#errorMessage").html("请输入支付密码");
		$("#errorMessage").show()
		return false;
	}
	else{
		$("#errorMessage").hide()
	}
	
	if(psd == null || psd ==''){
		$("#errorMessage").html("请输入确认密码");
		$("#errorMessage").show()
		return false;
	}
	else{
		$("#errorMessage").hide()
	}
	
	if(!path.test(password)){
		$("#errorMessage").html("支付密码为6位数字");
		$("#errorMessage").show()
		return false;
	}
	else{
		$("#errorMessage").hide()
	}
	if(!path.test(psd)){
		$("#errorMessage").html("确认密码为6位数字");
		$("#errorMessage").show()
		return false;
	}
	else{
		$("#errorMessage").hide()
	}
	
	
	if(password != psd){
		$("#errorMessage").html("两次输入密码不一致");
		$("#errorMessage").show()
		return false;
	}
	else{
		$("#errorMessage").hide()
	}
	
	
	
	return true;
}

function wangjimima(){
	$("#wjmmMessage").show();
}



</script>
</head>
<body>
<div class="body">
  <div class="backg">

   <div class="bd">
					<form id="inputForm" action="${ctxFront}/member/updatepayPassword"
						method="post" onsubmit=" return checkForm();">
						<input type="hidden" name="uid" value="${uid }" /> <input
							type="hidden" name="topage" value="${topage }" /> <input
							type="hidden" name="wechatId" value="${wechatId }" /> <input
							type="hidden" name="login" value="1" /> <input type="hidden"
							name="style" value="${style}" />
              <ul>
                <li>
                  <div class="message-tit">原支付密码:</div>
                  <input name="oldpassword" id="oldpassword" class="message-input" type="password"></li>
                <li>
                  <div class="message-tit">新支付密码:</div>
                  <input name="password" id="password" class="message-input" type="password"></li>
                <li>
                  <div class="message-tit">新确认密码:</div>
                  <input name="pwd" id="psd" class="message-input" type="password"></li>
                  <br/>
                  <span> <font color="red">${message}</font></span>
               	<br/>
							<div align="center" class="alert" id="errorMessage"
								style="color: red;">${message}</div>
                <div class="message-tool">
                  <input class="message-btn" value="提交" type="submit">
                </div>
                  <div id="wjmmMessage" class="shadow2">
					若忘记支付密码，请去商家重置支付密码!!
				</div>
									
              </ul>
              </form>
            </div>
</div>
     <c:if test="${uid ne '34' }">
		 <div class="footer">
        <p><!-- 版权所有&copy;&nbsp;&nbsp;  --><br>
		技术支持：<a href="http://www.hdzhx.com/boxin/index.html" >智讯互联</a><!-- &nbsp;&nbsp;	
		<a href="tel:03107056607">0310-7056607</a> -->
      </div>
	</c:if>
  </div>
</body>
</html>
